include ../CouchControlBuild.mak
CC=c++
CFLAGS += $(INCL)
#SOURCES=$(shell ls *.cpp)
OBJECTS=$(SOURCES:.cpp=.o)

# must find a way to address this
ifndef $(TARGET)
   TARGET = lib
endif

all: docs

docs:
	$(DOXYGEN) $(DOCTARGET)

shared: $(TARGET).so

static: $(TARGET).a

$(TARGET).so: $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

$(TARGET).a: $(OBJECTS) 
	rm -f $@
	$(AR) rc $@ $(OBJECTS)
	$(RANLIB) $@ 

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@

clean:
	rm -f $(TARGET).* *.o lib* core*
	rm -rf html latex

